#!/bin/bash
rm -f conf.zip
rm -rf conf_bak;
cp -r conf conf_bak;
cd conf_bak;
for file in *.dat
do 
    iconv -f gbk -t utf8 $file  >/dev/null 2>&1
    if [ $? -eq 0 ];
    then
        iconv -f gbk -t utf8 $file -o ../conf/$file
    fi
done
cd ..

zip conf.zip conf/* >/dev/null
rm -rf conf
mv conf_bak conf
